<template>
  <div>
    <p>{{ name }}</p>
    <button @click="zi">点击通知父组件</button>
  </div>
</template>

<script>
export default {
  name: "ZuJian",
  props: ["name"],
  data() {
    return {};
  },
  mounted() {},
  methods: {
    zi() {
      this.$emit("a", "上海");
    },
  },
};
</script>
<style lang='less' scoped>
</style>